﻿using BlogSystem.Data.Entity;
using BlogSystem.Model.Request;
using BlogSystem.Model.Respones;
using PagedList;


namespace BlogSystem.Service;

public interface IRemarkService
{

    /// <summary>
    ///  分页查询
    /// </summary>
    /// <param name="keyWord">关键字</param>
    /// <param name="pageIndex">页码</param>
    /// <param name="pageSize">每页数量大小</param>
    /// <returns></returns>
    Task<IQueryable<RemarkResponse>> GetRemarksAsync(string keyWord,int pageIndex,int pageSize);
  
    /// <summary>
    /// 添加 修改
    /// </summary>
    /// <param name="remarkRequest">请求Dto 的携带</param>
    /// <returns></returns>
    Task<bool> AddRemark(RemarkRequest remarkRequest);

    Task<bool> UpdateRemark(int id,RemarkRequest remarkRequest);
  
    /// <summary>
    /// 通过 id 删除评论
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> DelRemarkById(int id);

 
    /// <summary>
    ///   通过评论id获取当条评论信息
    /// </summary>
    /// <param name="id">评论的唯一编号</param>
    /// <returns></returns>
    Task<Remark> GetById(int id);

   /// <summary>
   ///  通过文章id 找对应的评论信息
   /// </summary>
   /// <param name="articleId">文章的唯一编号</param>
   /// <returns></returns>
   Task<List<Remark>> GetByArticleId(int articleId);
}